-- GENERATED SPELL FOR [Wing Commander Ichman] --


function spell0_13437(pUnit, Event) --@Greater Invisibility,Self--
pUnit:FullCastSpellOnTarget(16380,pUnit)
pUnit:RegisterEvent('Sorts_13437', 645, 1)
end

function spell1_13437(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(16509,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13437', 15000, 1)
end

function spell2_13437(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(15580,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13437', 526, 1)
end

function Sorts_13437(pUnit, Event)
local choix_sorts_13437 = math.random(0, 2)
if choix_sorts_13437 == 0 then
pUnit:RegisterEvent('spell0_13437', 1, 1)
end
if choix_sorts_13437 == 1 then
pUnit:RegisterEvent('spell1_13437', 1, 1)
end
if choix_sorts_13437 == 2 then
pUnit:RegisterEvent('spell2_13437', 1, 1)
end
end

function mob13437_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_13437', math.random(1500, 3000), 1)
end

function mob13437_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13437_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13437_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(13437, 1, 'mob13437_Action')
RegisterUnitEvent(13437, 2, 'mob13437_Leave')
RegisterUnitEvent(13437, 3, 'mob13437_Kill')
RegisterUnitEvent(13437, 4, 'mob13437_Die')
